/**
 * 文件名：****.java
 * 版权：Copyright Lightkit All Rights Reserved.
 * 描述：*****
 */
package com.lightkits.wms.domain.retirelib;

import com.lightkits.common.db.entity.WmExecuteLine;
import com.lightkits.common.db.entity.WmRequestHeader;
import com.lightkits.common.db.entity.WmRequestLine;
import com.lightkits.framework.common.model.CheckResult;
import com.lightkits.wms.dto.retirelib.model.RetireLibDto;
import com.lightkits.wms.dto.stocktransfer.model.MiscellAdjust;

import java.util.List;

/**
 * @author jing.wei@hand-china.com
 * @date 2019/6/17 16:06
 **/
public interface CreateRetireDocParams {

    /**
     * 创建领料单头信息
     *
     * @param workerId 员工Id
     * @param orgId    组织Id
     * @return WmRequestHeader
     */
    CheckResult<WmRequestHeader> createRequestHeader(String workerId, String orgId);

    /**
     * 创建领料单行
     *
     * @param libDtos    报废参数列表
     * @param headerId   领料单头Id
     * @param moveTypeId 移动类型Id
     * @return WmRequestLine
     */
    CheckResult<List<WmRequestLine>> createRequestLines(List<RetireLibDto> libDtos,
                                                        Long headerId,
                                                        String moveTypeId);

    /**
     * 创建领料单执行
     *
     * @param lins     领料单行信息
     * @param headerId 领料单头Id
     * @param eventId  事件ID
     * @return WmExecuteLine
     **/
    CheckResult<List<WmExecuteLine>> createExecuteLine(List<WmRequestLine> lins,
                                                       Long headerId,
                                                       Long eventId);

    /**
     * @param requestLines  领料单行
     * @param parentEventId 父事件ID
     * @param moveTypeId    移动类型Id
     * @param header        领料单头
     * @return MiscellAdjust
     */
    CheckResult<List<MiscellAdjust>> createOnhand(List<WmRequestLine> requestLines,
                                                  WmRequestHeader header,
                                                  String moveTypeId,
                                                  Long parentEventId);
}
